package com.yunqian.util;

import com.aliyun.oss.OSSClient;

/**
 * @author zou
 * @describe
 * @date 2018/10/25
 */
public class AliyunUtil {

    /**
     * Endpoint 华南
     */
    private static final String END_POINT = "http://oss-cn-shenzhen.aliyuncs.com";
    /**
     * 阿里云主账号AccessKey拥有所有API的访问权限，风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维，
     * 请登录 https://ram.console.aliyun.com 创建RAM账号。
     */
    private static final String ACCESS_KEY_ID = "LTAIjycLHD2GiTGU";
    private static final String ACCESS_KEY_SECRET = "OQitsiDrEbPCG0G64Ld9Qr9gIIcZa7";
    public static final String BUCKET_NAME = "reddotmuseum";

    /**
     * 获取cos客户端
     */
    public static OSSClient getOSSClient() {
        // 创建OSSClient实例。
        OSSClient ossClient = new OSSClient(END_POINT, ACCESS_KEY_ID, ACCESS_KEY_SECRET);
        // 3 生成cos客户端
        return ossClient;
    }


}
